﻿
new Vue({
    el: '#app',
    delimiters:['[[', ']]'],

    data: {
        animoji_id: {{ new_animoji_id }},
        animoji_name: '',
        animoji_resource: '',
        animoji_orderno: 0,
    },

    methods: {
        /**
         * 创建新的动态表情
         */
        newAnimoji() {
            let url = "{% url 'gma:api_new_animoji' %}";
            let data = {
                'id': this.animoji_id,
                'name' : this.animoji_name,
                'resource' : this.animoji_resource,
                'orderno' : this.animoji_orderno,
            };
            new my_ajax(url, data, '', '', () => {
                show_toast('创建成功');
                redirect();
            });
        },

        cancel() {
            window.history.back();
        },
    },

    mounted() {
    },
});
